<?php

namespace App\Models;

use Carbon\Carbon;
use Dcat\Admin\Traits\HasDateTimeFormatter;

use Illuminate\Database\Eloquent\Model;

/**
 * 访客审核日志
 * App\Models\VisitorApprovalLog
 *
 * @property int $id
 * @property string|null $uniqueId uniqueId
 * @property string|null $unionId unionId
 * @property string|null $openid openid
 * @property string|null $authorId authorId
 * @property string|null $image_path 图片路劲
 * @property string|null $visitor_name 访客姓名
 * @property string|null $visitor_phone 访客电话
 * @property string|null $interviewee_name 受访者姓名
 * @property int|null $interviewee_phone 受访者电话
 * @property string|null $reason 访问原因
 * @property int $author_status author_status
 * @property int $arrive_status arrive_status
 * @property int $verify_status verify_status
 * @property int $pass_type 通行证类型
 * @property int $source 访问区域
 * @property string|null $start_time 预约开始时间
 * @property string|null $end_time 预约结束时间
 * @property string|null $created 预约创建时间
 * @property string|null $updated 预约更新时间
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @method static \Illuminate\Database\Eloquent\Builder|VisitorApprovalLog newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|VisitorApprovalLog newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|VisitorApprovalLog query()
 * @method static \Illuminate\Database\Eloquent\Builder|VisitorApprovalLog whereArriveStatus($value)
 * @method static \Illuminate\Database\Eloquent\Builder|VisitorApprovalLog whereAuthorId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|VisitorApprovalLog whereAuthorStatus($value)
 * @method static \Illuminate\Database\Eloquent\Builder|VisitorApprovalLog whereCreated($value)
 * @method static \Illuminate\Database\Eloquent\Builder|VisitorApprovalLog whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|VisitorApprovalLog whereEndTime($value)
 * @method static \Illuminate\Database\Eloquent\Builder|VisitorApprovalLog whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|VisitorApprovalLog whereImagePath($value)
 * @method static \Illuminate\Database\Eloquent\Builder|VisitorApprovalLog whereIntervieweeName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|VisitorApprovalLog whereIntervieweePhone($value)
 * @method static \Illuminate\Database\Eloquent\Builder|VisitorApprovalLog whereOpenid($value)
 * @method static \Illuminate\Database\Eloquent\Builder|VisitorApprovalLog wherePassType($value)
 * @method static \Illuminate\Database\Eloquent\Builder|VisitorApprovalLog whereReason($value)
 * @method static \Illuminate\Database\Eloquent\Builder|VisitorApprovalLog whereSource($value)
 * @method static \Illuminate\Database\Eloquent\Builder|VisitorApprovalLog whereStartTime($value)
 * @method static \Illuminate\Database\Eloquent\Builder|VisitorApprovalLog whereUnionId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|VisitorApprovalLog whereUniqueId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|VisitorApprovalLog whereUpdated($value)
 * @method static \Illuminate\Database\Eloquent\Builder|VisitorApprovalLog whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|VisitorApprovalLog whereVisitorName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|VisitorApprovalLog whereVisitorPhone($value)
 * @mixin \Eloquent
 */
class VisitorApprovalLog extends Model
{
	use HasDateTimeFormatter;
    protected $table = 'visitor_approval_log';

    protected $guarded = ['id'];

    protected $casts = [
        // 'start_time' => 'datetime',
        // 'end_time' => 'datetime',
        // 'created' => 'timestamp',
        // 'updated' => 'timestamp',
    ];

    // public function setStartTimeAttribute($value)
    // {
    //     dd(Carbon::parse($value)->toDateTimeString());
    // }

}
